<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>资料修改-达拉崩吧</title>
  <link rel="stylesheet" href="../../static/css/semantic.min.css" th:href="@{/css/semantic.min.css}">
  <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css" th:href="@{/lib/editormd/css/editormd.min.css}">
  <link rel="stylesheet" href="../../static/css/me.css" th:href="@{/css/me.css}">
</head>
<body>

  <!--导航-->
  <nav th:replace="admin/admin-common :: menu(0)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
  </nav>


  <!--中间内容-->
  <div  class="m-container-small m-padded-tb-big">
    <br>
    <br>
    <br>
    <div class="ui container">
      <form action="#" method="post" th:action="@{/admin/user}" class="ui form">
        <input type="hidden" name="id" th:value="${session.user.id}">
        <div class="field">
          <div class="ui left labeled input">
            <label class="ui teal basic label">昵称</label>
            <input type="text" name="nickname" th:value="${session.user.nickname}">
          </div>
          <div class="ui left labeled input">
            <label class="ui teal basic label">头像</label>
            <input type="text" name="avatar" th:value="${session.user.avatar}">
          </div>
          <div class="ui left labeled input">
            <label class="ui teal basic label">email</label>
            <input type="text" name="email" th:value="${session.user.email}">
          </div>
          <div class="ui left labeled input">
            <label class="ui teal basic label">其他信息</label>
            <input type="text" name="info" th:value="${session.user.info}">
          </div>
          <div class="ui left labeled input">
            <label class="ui teal basic label">网站信息</label>
            <input type="text" name="webInfo" th:value="${session.user.webInfo}">
          </div>
        </div>

        <div class="ui error message"></div>

        <div class="ui right aligned container">
          <button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
          <button class="ui teal submit button">提交</button>
        </div>

      </form>
    </div>
  </div>


  <br>
  <br>
  <br>
  <br>
  <br>
  <br>

  <!--底部footer-->
  <footer th:replace="admin/admin-common :: footer" class="ui inverted vertical segment m-padded-tb-massive">
  </footer>

  <script src="../../static/js/jquery-1.7.2.min.js" th:src="@{/js/jquery-1.7.2.min.js}"></script>
  <script src="../../static/js/semantic.min.js" th:src="@{/js/semantic.min.js}"></script>
  <script src="../../static/lib/editormd/editormd.min.js" th:src="@{/lib/editormd/editormd.min.js}"></script>
  <script>


    $('.menu.toggle').click(function () {
      $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
      on : 'hover'
    });

    $('.ui.form').form({
      fields : {
        nickname : {
          identifier: 'nickname',
          rules: [{
            type : 'empty',
            prompt: '请输入昵称'
          }]
        },
        avatar : {
          identifier: 'avatar',
          rules: [{
            type : 'empty',
            prompt: '请输入头像地址'
          }]
        }
      }
    });

  </script>
</body>
</html>